package com.ruoyi.loans.controller;

import com.ruoyi.loans.pojo.LoanCheckInfo;
import com.ruoyi.loans.pojo.Result;
import com.ruoyi.loans.pojo.SearchVo;
import com.ruoyi.loans.service.LoanCheckInfoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("/api/loancheckinfo")
public class LoanCheckInfoController {
    @Autowired
    LoanCheckInfoService loanCheckInfoService;

    @RequestMapping("addLoancheckinfo")
    public void addLoancheckinfo(@RequestBody LoanCheckInfo loanCheckInfo)
    {
        loanCheckInfoService.add(loanCheckInfo);
    }

    @RequestMapping("findLoanCheckList")
    public Result findLoanCheckList(@RequestBody SearchVo searchVo){
        return loanCheckInfoService.findLoanCheckList(searchVo);
    }

    @RequestMapping("updateIsStatus")
    public Result updateIsStatus(@RequestBody LoanCheckInfo loanCheckInfo){
        return loanCheckInfoService.updateIsStatus(loanCheckInfo);
    }

    @GetMapping("delById/{id}")
    public Result delById(@PathVariable Integer id){
        return loanCheckInfoService.delById(id);
    }
}
